'use strict';



import React, { Component } from 'react';

import {
	View,
	Image,
	ImageBackground,
	Dimensions,
	TouchableWithoutFeedback,
	StyleSheet,
	Text,
	TouchableOpacity,
	TextInput,
	ScrollView,
	TouchableHighlight,
	TouchableNativeFeedback,
	Switch,
	Modal
} from 'react-native';

import ToastUtil from '../../../../core/utils/toast-util.js';
import { Loading, EasyLoading } from 'react-native-easy-loading';

import DatePicker from 'react-native-datepicker'
import Hr from 'react-native-hr'
import Color from '../../../../core/constant/color.js';


import Constant from '../../../../core/constant/constant';

import CameraButton from '../../../../core/component/comp.button-camera.js';

import Toolbar from '../../../../core/component/comp.toolbar';


import InitDB from '../../../../core/database/init-db.js';

import ModalDropdown from '../../../../core/component/comp.modal-dropdown.js';
import { NavigationActions } from 'react-navigation'





let winWidth = Dimensions.get('window').width;//屏幕宽度

let winHeight = Dimensions.get('window').height;//屏幕高度




let headImgEmpty = require('../../../../img/headImg_empty.png');
import Http from '../../../../core/utils/http.js';




const BORDER_COLOR_NORMAL = '#DDD';

const BORDER_COLOR_RED = '#ff0000';

const BUTTON_BGCOLOR_ENABLE = '#FFC000';

const BUTTON_BGCOLOR_DISABLE = '#FFC000';

const BUTTON_COLOR_ENABLE = '#FFFFFF';

const BUTTON_COLOR_DISABLE = '#FFC000';

let instance;

class AccountSafeScene extends React.Component {
	// 构造
	constructor(props) {
		super(props);




		this.state = {
			username:''

		}




		instance = this;



	}





	componentDidMount() {

		let username = InitDB.getUserInfo('QST_CODE="username"')[0].OPT_VAL;
		this.setState({
			username:username
		})




	}



	goToChangeMobile(){

		instance.props.navigation.navigate('UpdateMobile1');
		
		
	}





	render() {
		return (


			<ScrollView style={styles.body}>

				<Loading />
				<View style={{marginTop:230,flexDirection:'row',justifyContent:"center"}}>
				 <Text style={{fontWeight:"bold",fontSize:16}}>你的手机号:{this.state.username}</Text> 
				</View>
				<TouchableHighlight style={{marginLeft:10,marginRight:10,marginTop:15,backgroundColor:Color.BTN_BGCOLOR,
				padding:10,
				borderRadius: 5,
				
			}} onPress={this.goToChangeMobile.bind(this)}>
				 <Text style={{fontWeight:"bold",fontSize:16,color:Color.BTN_TEXT,alignSelf:"center"}}>更换手机号</Text> 
				</TouchableHighlight>


				
						 







			</ScrollView>




		)
		//}




	}

}


class VideoSpzt extends React.Component {



	render() {
		let spzt = this.props.spzt;
		if (spzt && spzt != '1') {

			let spztDesc;
			if (spzt === '0') {
				spztDesc = '视频认证审批中';
			} else if (spzt === '2') {
				spztDesc = '视频认证未通过';
			}

			return (
				<View style={[this.props.styles, { backgroundColor: '#393130' }]}>
					<Text>{spztDesc}</Text>
				</View>
			);

		} else {
			return null;
		}
	}

}


const PageColor = {
	textLabel: 'rgb(143,143,143)',
	borderColor: 'rgb(230,230,230)',
}


const styles = StyleSheet.create({
	body: {
		backgroundColor: Color.VIEW_BG_COLOR,
		height: winHeight,
		flexDirection:"column",
		flex: 1,
		
	},
	

});

module.exports = AccountSafeScene;